// index.ts
import Dialog from '@vant/weapp/dialog/dialog';

Page({
  data: {
    motto: 'Hello World',
  },
  onLoad() {
    this.customTabBarStatusChange();
  },

  // tabbar状态修改
  customTabBarStatusChange() {
    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
      this.getTabBar().setData({selected: 0})
    }
  },

  // 按钮alert弹窗
  showDialog() {
    Dialog.alert({
      title: '标题',
      message: '弹窗内容',
    }).then(() => {
      // on close
    });

  }
})
